package com.bjyhl.core.video;

import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.widget.Toast;
import android.widget.VideoView;

public class VideoViewFull extends VideoView {
    public VideoViewFull(Context context) {
        super(context);
    }

    public VideoViewFull(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public VideoViewFull(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

//    public VideoViewFull(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
//        super(context, attrs, defStyleAttr, defStyleRes);
//    }

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);

        int width = getDefaultSize(0, widthMeasureSpec);
        int height = getDefaultSize(0, heightMeasureSpec);

//        Log.e("Width@Height", widthMeasureSpec + "@" + heightMeasureSpec);
//        Toast.makeText(getContext(), widthMeasureSpec + "@" + heightMeasureSpec, Toast.LENGTH_LONG).show();

        setMeasuredDimension(width, height);
    }
}
